﻿using System;
using System.Runtime.Serialization;
using MugenMvvmToolkit.Utils;

namespace MugenMvvmToolkit.Models
{
    /// <summary>
    ///     Represents the url parameter.
    /// </summary>
#if WPF
    [Serializable]
#endif
    [DataContract]
    public struct UriParameter
    {
        #region Fields

        /// <summary>
        ///     Gets the key.
        /// </summary>
        public readonly string Key;

        /// <summary>
        ///     Gets the value.
        /// </summary>
        public readonly string Value;

        #endregion

        #region Constructors

        /// <summary>
        ///     Initializes a new instance of the <see cref="T:System.Object" /> class.
        /// </summary>
        public UriParameter(string key, string value)
        {
            Should.NotBeNull(key, "key");
            Key = key;
            Value = value;
        }

        #endregion
    }
}